package com.aube.plugin.gallery.preview;

import android.content.Context;
import android.util.AttributeSet;
import android.view.View;

import com.huyn.baseframework.dynamicload.DLLayout;
import com.huyn.baseframework.dynamicload.IPositionManager;
import com.huyn.baseframework.utils.Utils;

/**
 * Created by huyaonan on 16/8/30.
 */
public abstract class ViewPagerLayoutBase extends DLLayout {

    protected View.OnClickListener mClickListener;
    protected View.OnLongClickListener mLongClickListener;
    protected ImgPreviewVPAdapter.IPreiewGetter iGetter;
    protected int mIndex=-1;

    public ViewPagerLayoutBase(Context context) {
        this(context, null);
    }

    public ViewPagerLayoutBase(Context context, AttributeSet attrs) {
        this(context, attrs, 0);
    }

    public ViewPagerLayoutBase(Context context, AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public void setClickListener(View.OnClickListener mClickListener, View.OnLongClickListener mLongClickListener) {
        this.mClickListener = mClickListener;
        this.mLongClickListener = mLongClickListener;
    }

    public void setPreviewGetterAndIndex(int index, ImgPreviewVPAdapter.IPreiewGetter iGetter) {
        this.mIndex = index;
        this.iGetter = iGetter;
        Utils.sysout("add setPreviewGetterAndIndex to " + index);
    }

    public abstract void setAsset(String asset);

    @Override
    public void initViews() {

    }

    @Override
    public void fillData(Object o) {

    }

    @Override
    public void notifyAnim(int i) {

    }

    @Override
    public void registToManager(IPositionManager iPositionManager) {

    }

    @Override
    public void unreistFromManager(IPositionManager iPositionManager) {

    }

    @Override
    public int[] getLocations() {
        return new int[0];
    }
}
